#ifndef SENSOR_H
#define SENSOR_H
/**
 * The sensor class.
 * This is the parent class to the different sensor implementations.
 */
class Sensor
{
public:
	virtual ~Sensor();

	/**
	 * The sensor type.
	 * This enumeration describes the type of hardware sensor a child instance of this class is tied to.
	 */
	enum SensorType
	{
		COLLISION, /**< The collision detecting bumpers */
		COLORLANE,  /**< The light sensors */
		CROSSROADS,  /**< The light sensors */
		DISTANCE  /**< The infrared distance sensor */
	};
	/**
	 * Function to start the sensor.
	 * Sets the activated variable to true.
	 * @see activated
	 */
	void activate();
	/**
	 * Function to stop the sensor.
	 * Sets the activated variable to false.
	 * @see activated
	 */
	void disable();

	/**
	 * A pure virtual member.
	 */
	virtual bool poll() = 0;
	/**
	 * A pure virtual member.
	 */
	virtual SensorType getSensorType() = 0;

protected:
	/**
	 * Constructor always constructs instances where the activated variable is false.
	 */
	Sensor() : activated(0)  //Only objects of subclasses may be instantiated
	{

	}
private:
	/**
	 * This variable records if the sensor is active.
	 */
	bool activated;
};
#endif
